public class Demo {
    public static void main(String[] args) throws InterruptedException {
        Thread t1=new Thread(()->{
            for (int i = 0; i < 3; i++) {
                System.out.println("Hello t1");
            }
        });
        System.out.println("t1线程创建前的存活状态"+t1.isAlive());
        t1.start();
        System.out.println("t1线程创建后的存活状态"+t1.isAlive());;
        Thread.sleep(4000);
        System.out.println("t1线程结束后的存活状态"+t1.isAlive());
    }
}
